﻿using MediatR;
using RBAC.ErrorCode;
using RBAC.Domain.Dto.Output;

namespace RBAC.Read.Api.Application.Command.ERP.SalesManagement
{
    /// <summary>
    /// 销售订单分页查询命令
    /// </summary>
    public class SalesOrderPageCommand : IRequest<APIPaging<SalesOrderDto>>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 每页数量
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 订单编码
        /// </summary>
        public string? OrderCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public string? OrderStatus { get; set; }

        /// <summary>
        /// 业务状态
        /// </summary>
        public string? BusinessStatus { get; set; }

        /// <summary>
        /// 开始日期
        /// </summary>
        public DateTime? StartDate { get; set; }

        /// <summary>
        /// 结束日期
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 销售人员
        /// </summary>
        public string? SalesPerson { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string OrderBy { get; set; } = "CreateTime DESC";
    }
}
